package cmbchina.entity;


import java.io.Serializable;
import java.util.Objects;

/**
 * A Flow.
 */
public class Flow implements Serializable {


    private Long id;

    private String processInstId;

    private Integer state;//流程状态 1.准备 2.运行中 3.暂停 4.失败 5.成功 6.定时中 7.待输入参数

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getProcessInstId() {
        return processInstId;
    }

    public Flow processInstId(String processInstId) {
        this.processInstId = processInstId;
        return this;
    }

    public void setProcessInstId(String processInstId) {
        this.processInstId = processInstId;
    }

    public Integer getState() {
        return state;
    }

    public Flow state(Integer state) {
        this.state = state;
        return this;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Flow flow = (Flow) o;
        if (flow.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), flow.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "Flow{" +
            "id=" + getId() +
            ", processInstId='" + getProcessInstId() + "'" +
            ", state='" + getState() + "'" +
            "}";
    }
}
